package com.cyy.springbootinit.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cyy.springbootinit.model.dto.paymentbill.PaymentBillQueryRequest;
import com.cyy.springbootinit.model.entity.PaymentBill;
import com.cyy.springbootinit.model.vo.PaymentBillVO;

import javax.servlet.http.HttpServletRequest;

/**
 * 缴费单表服务
 *
 * @author 程序员cyy</a>
 * @from cyy</a>
 */
public interface PaymentBillService extends IService<PaymentBill> {

    /**
     * 校验数据
     *
     * @param paymentBill
     * @param add 对创建的数据进行校验
     */
    void validPaymentBill(PaymentBill paymentBill, boolean add);

    /**
     * 获取查询条件
     *
     * @param paymentBillQueryRequest
     * @return
     */
    QueryWrapper<PaymentBill> getQueryWrapper(PaymentBillQueryRequest paymentBillQueryRequest);

    /**
     * 获取缴费单表封装
     *
     * @param paymentBill
     * @param request
     * @return
     */
    PaymentBillVO getPaymentBillVO(PaymentBill paymentBill, HttpServletRequest request);

    /**
     * 分页获取缴费单表封装
     *
     * @param paymentBillPage
     * @param request
     * @return
     */
    Page<PaymentBillVO> getPaymentBillVOPage(Page<PaymentBill> paymentBillPage, HttpServletRequest request);
}
